package net.qiqb.usr.points.domain;

import lombok.Getter;
import net.qiqb.usr.custom.client.types.CustomerId;
import net.qiqbframework.common.IdentifierFactory;
import net.qiqbframework.modelling.domain.AggregateRoot;
import net.qiqbframework.modelling.domain.EntityIdentifier;

import java.io.Serializable;

//@AggregateRoot
@Getter
public class Points implements Serializable {

    @EntityIdentifier
    private final String id;

    private final CustomerId customerId;
    /**
     * 积分
     */
    private Integer point;

    public Points(CustomerId customerId) {
        this.id = IdentifierFactory.getInstance().generate();
        this.customerId = customerId;
    }

    public Points(String id, CustomerId customerId) {
        this.id = id;
        this.customerId = customerId;
    }
}
